From 4bf1e4ebe6f5142f36219efdddc381ae92164079 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 15 Oct 2016 21:34:32 +0200 Subject: [PATCH] toolbar: Remove max-child-expand child property --- gtk/gtktoolbar.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 1e7c5506e9..28a464694e 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -276,8 +276,6 @@ static gboolean gtk_toolbar_render (GtkCssGadget *gadget, int height, gpointer data); -static gint get_max_child_expand (GtkToolbar *toolbar); - /* methods on ToolbarContent 'class' */ static ToolbarContent *toolbar_content_new_tool_item (GtkToolbar *toolbar, GtkToolItem *item, @@ -589,15 +587,6 @@ gtk_toolbar_class_init (GtkToolbarClass *klass) FALSE, GTK_PARAM_READWRITE)); - gtk_widget_class_install_style_property (widget_class, - g_param_spec_int ("max-child-expand", - P_("Maximum child expand"), - P_("Maximum amount of space an expandable item will be given"), - 0, - G_MAXINT, - G_MAXINT, - GTK_PARAM_READABLE)); - binding_set = gtk_binding_set_by_class (klass); add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT); @@ -1562,7 +1551,6 @@ gtk_toolbar_allocate (GtkCssGadget *gadget, */ if (!overflowing) { - gint max_child_expand; n_expand_items = 0; for (i = 0, list = priv->content; list != NULL; list = list->next, ++i) @@ -1573,7 +1561,6 @@ gtk_toolbar_allocate (GtkCssGadget *gadget, n_expand_items++; } - max_child_expand = get_max_child_expand (toolbar); for (list = priv->content, i = 0; list != NULL; list = list->next, ++i) { ToolbarContent *content = list->data; @@ -1584,9 +1571,6 @@ gtk_toolbar_allocate (GtkCssGadget *gadget, if (size % n_expand_items != 0) extra++; - if (extra > max_child_expand) - extra = max_child_expand; - allocations[i].width += extra; size -= extra; n_expand_items--; @@ -3423,17 +3407,6 @@ toolbar_content_show_all (ToolbarContent *content) gtk_widget_show_all (widget); } -static gint -get_max_child_expand (GtkToolbar *toolbar) -{ - gint mexpand = G_MAXINT; - - gtk_widget_style_get (GTK_WIDGET (toolbar), - "max-child-expand", &mexpand, - NULL); - return mexpand; -} - /* GTK+ internal methods */ gchar * _gtk_toolbar_elide_underscores (const gchar *original) -- 2.30.2